<?php

namespace App\Exceptions;

use Symfony\Component\HttpKernel\Exception\HttpException ;

class ApiException extends HttpException
{
    protected $servicecode = 5000;

    public function __construct($message = null, ?int $code = 5000,   \Throwable $previous = null, array $headers = [],int $statusCode=200)
    {
        $this->servicecode = $code;
        parent::__construct( $statusCode, $message, $previous, $headers, $code);
    }

    public function getServiceCode(){
        return $this->servicecode;
    }
}
